package top.yihoxu.util;

import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester;

import java.util.Map;

/**
 * @Author dth
 * @Date 2023/8/11 23:48
 * @PackageName:com.yihoxu.yihoxu_interface.util
 * @ClassName: SignUtils
 * @Description:
 * @Version 1.0
 */
public class SignUtils {
    public static String getSign(Map<String,String >map, String secretKey) {
        Digester md5 = new Digester(DigestAlgorithm.SHA256);
        String sign = map.toString() + "..." + secretKey;
        return md5.digestHex(sign);
    }
}
